home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / DOORDR40.ARJ / DOORDRIV.DOC < prev    next >
Text File  |  1991-03-17  |  30KB  |  823 lines

  1.                         Doordriver version 4.00
  2.                             By Scott Baker
  3.  
  4. IMPORTANT- Changes from previous version
  5. ----------------------------------------
  6.   You MUST call "InitDoorDriver('filename.ext')" in your program BEFORE any
  7. doordriver features are activated. This is VERY important.
  8.   Doordriver is now distributed in two versions. DOORDRIV.TPU is the standard
  9. version while DOORDRSM.TPU is the small version. The smaller one simply
  10. excludes come of the less used features.
  11.  
  12. Introduction
  13. ------------
  14.   DoorDriver is a set of procedures for turbo pascal version 5.5 that allows
  15. the easy creation of Door programs for various bbs types including
  16. Rbbs-Pc, Pc-Board, WWIV, Phoenix, and many more types. The routines are
  17. distributed in a .TPU file. They include fossil and BIOS based serial
  18. I/O, High-level string input routines, and complete ANSI support.
  19.  
  20. Overview of routines
  21. --------------------
  22.   The procedures included in the DoorDriver package can be categorized into
  23. two main groups - Input and Output. The output routines consist of SWRITE()
  24. and SWRITELN() which do the equivilant of the Turbo Pascal routines
  25. WRITE() and WRITELN(). The input routines consist of SREAD(var s: string),
  26. SREAD_NUM(var i: integer), SREAD_NUM_WORD(var w: word),
  27. SREAD_NUM_BYTE(var b: byte), SREAD_NUM_LONGINT(l: longint), and
  28. PROMPT(var s: string; length: integer; hilight: boolean). Also included
  29. are routines for time-limit management, information filtering, advanced
  30. menu systems, and much much more.
  31.  
  32. BBS-Software independence
  33. -------------------------
  34.   DoorDriver will allow you to develop your software independent of whatever
  35. bbs software the sysop is using. DoorDriver correctly loads the users info
  36. from RBBS-PC, PCBOARD version 12, PHOENIX, QBBS, and WWIV with more
  37. type coming soon (PCB v. 14 and WILDCAT). The users time-left is automatically
  38. calculated and maintained by DoorDriver.
  39.  
  40.  
  41. Configuration
  42. -------------
  43.   New with doordriver version 3.0 is the use of a control file for
  44. configuration. All configuration parameters are stored inside the control
  45. file which may be edited with any ASCII editor.
  46.   The control file is loaded with a call to "InitDoorDriver()". This must
  47. be done before any of doordrivers procedures, functions, or variables are
  48. used.
  49.   A sample control file (DOORDRIV.CTL) is included. Your program can pick any
  50. name it wants for the control file (i.e. NEWS.CTL, GALWAR.CTL, etc). Just
  51. rename DOORDRIV.CTL to that filename and distribute it with your users so they
  52. have a sample to work off of.
  53.   The record structure for the configurable editor (CFGEDITR.TPU) has been
  54. modified. See edittest.pas for the new format.
  55.  
  56. Reference - Procedures
  57. ----------------------
  58.  
  59. INITDOORDRIVER(filen: string);
  60.      This procedure MUST BE CALLED before any of doordrivers features are
  61.   used in your program. The filename specifies the name of the control file
  62.   that your door will use to load it's parameters off of. (the /C option is
  63.   no longer used). InitDoorDriver parses the control file, loads the
  64.   bbs information, etc.
  65.  
  66. DISPLAYFILE(Filen: String);
  67.  
  68.      This Procedure is usefull in that it will transfer an Ascii or Ansi
  69.   file, and will put "(C)ontinue,(S)top,(N)onstop" to stop an Ascii file
  70.   from scrolling of the page and thus allowing the user to read this file
  71.   at his or her own speed.
  72.  
  73.  
  74. DISPLAY_MACRO(s: string);
  75.  
  76.      This procedure is used to display a macro-string. The macro string is
  77.   usually contained in the variable MACRO_STRING.
  78.  
  79.  
  80. PROMPT(var s: string; length: integer; hilight: boolean);
  81.  
  82.      The prompt procedure is a high-level string input routine. It allows you
  83.   to specify the maximum length of the input string and if HILIGHT is set to
  84.   true, it will hilight the input in reverse background. The colors for the
  85.   prompt routine are defined in the configuration menu.
  86.  
  87.  
  88. RECORD_MACRO(var s: string);
  89.  
  90.      This procedure allows the user to record a macro string, up to 255
  91.   characters that will be invoked whenever the CTRL-N key is pressed. The
  92.   macro is stored in the string variable S. To activate the macro
  93.   capability, you must place the macro into the string variable
  94.   "MACRO_STRING".
  95.  
  96.  
  97. SCLRSCR;
  98.  
  99.      This procedure clears the remote side's and the local side's screen.
  100.  
  101.  
  102. SET_FOREGROUND(i: integer);
  103.  
  104.      The set_foreground procedure sets the current foreground color to the
  105.   one specified by the integer variable, i. The color is set both on the
  106.   local side and the remote side if the remote user has ANSI toggled on. The
  107.   acceptable range for the color is 0-15.
  108.  
  109.  
  110. SET_BACKGROUND(i: integer);
  111.  
  112.      The set_background procedure sets the current background color to the
  113.   one specified by the integer variable, i. The color is set both on the
  114.   local side and the remote terminal if the remote user has toggled his
  115.   ANSI on. The acceptable range for the color is 0-7.
  116.  
  117.  
  118. SGOTO_XY(x,y: integer);
  119.  
  120.      Sgoto_xy allows you to position the cursor on the local and remote
  121.   screen. The valid range for X is 1 to 80 and the valid range for Y
  122.   is 1 to 24.
  123.  
  124.  
  125. SREAD_CHAR(var c: char);
  126.  
  127.      This procedure waits for a character to be pressed and then returns that
  128.   character in the character variable. No echoing is performed (i.e. the user
  129.   will not see the key he pressed). If you wish echoing, you must again write
  130.   the character with SWRITE below. This routine is useful for writing your
  131.   own lowlevel readln routines or performing "hot-key" operations. It is
  132.   a direct replacement for CH:=READKEY.
  133.  
  134. SREAD(var s: string);
  135.  
  136.      The sread procedure accomplishes the equivilant of the Turbo Pascal
  137.   procedure READLN. A string is read from the user and wher the CR character
  138.   is obtained, the procedure exits with the string stored in the string
  139.   variable, s.
  140.  
  141.  
  142. SREAD_NUM(var i: integer);
  143.  
  144.      The sread_num procedure is almost identical to the sread procedure except
  145.   it will read an integer variable instead of a string. Only the characters
  146.   0-9 are allowed to be entered by the user. The value returned will be in the
  147.   range of -32768 to +32768.
  148.  
  149.  
  150. SREAD_NUM_BYTE(var b: byte);
  151.  
  152.      The sread_num_byte procedure is almost identical to the sread procedure
  153.    except it will read an byte variable instead of a string. Only the
  154.    characters 0-9 are allowed to be entered by the user. The value returned
  155.    will be in the range of 0 to 255.
  156.  
  157.  
  158. SREAD_NUM_WORD(var w: word);
  159.  
  160.      The sread_num_word procedure is almost identical to the sread procedure
  161.    except it will read an word variable instead of a string. Only the
  162.    characters 0-9 are allowed to be entered by the user. The value returned
  163.    will be in the range of 0 to 65535.
  164.  
  165.  
  166. SREAD_NUM_LONGINT(var l: longint);
  167.  
  168.      The sread_num_longint procedure is almost identical to the sread procedure
  169.    except it will read an longint variable instead of a string. Only the
  170.    characters 0-9 are allowed to be entered by the user. The value returned
  171.    will be in the range of -2147483648 to +2147483647.
  172.  
  173.  
  174. SWRITE(s: string);
  175.  
  176.      The swrite procedure is the equivilant of the Turbo Pascal WRITE
  177.   procedure. Swrite will simultaniously write to both the local screen
  178.   and the remote terminal. No CR/LF sequence is added to the end of the
  179.   string.
  180.  
  181.  
  182. SWRITELN(s: string);
  183.  
  184.      The swriteln procedure is the equivilant of the Turbo Pascal WRITELN
  185.    procedure. Swrite will simultaniously write to both the local screen
  186.    and the remote terminal. A CR/LF sequence is appended to the end of
  187.    the string.
  188.  
  189.  
  190. Reference - Functions
  191. ---------------------
  192.  
  193. SKEYPRESSED: Boolean;
  194.  
  195.      This allows the program to pause until the user presses a key. When
  196.   used in a loop like this it stops everything until user input occurs.
  197.  
  198.                    Repeat Until skeypress;
  199.  
  200.  
  201. TIME_LEFT: Byte;
  202.  
  203.      The time_left function returns the amount of time left in minutes. The
  204.   time is computed internally by echodor and we need not be concerned about
  205.   it here.
  206.  
  207. Reference - Variables
  208. ---------------------
  209.  
  210. ANSION: boolean;
  211.  
  212.      When the door gets loaded the bbs door info file specify's if the
  213.   current user has ansi on or not. It is then transfered into this variable.
  214.  
  215.  
  216. BAUD_RATE: integer;
  217.  
  218.      This variable holds the users current baud rate.
  219.  
  220. BBS_SOFTWARE: byte;
  221.  
  222.      The following numbers indicate software names:
  223.  
  224.   1 : Mach-10 BBS
  225.   2 : Rbbs-Pc
  226.   3 : Qbbs
  227.   4 : Pcboard-12
  228.   5 : WWIV
  229.   6 : Opus
  230.   7 : Rbbs 16.x
  231.   8 : Phoenix
  232.   9 : WildCat
  233.   10: Pcboard-14
  234.  
  235.  
  236. BBS_TIME_LEFT: integer;
  237.  
  238.      The users time left is transfered into this variable from the bbs.
  239.  
  240.  
  241. BOARD_NAME: String[70];
  242.  
  243.      Board_Name hold the current BBS's name that is set on the configuration
  244.   menu.
  245.  
  246.  
  247. COM_PORT: byte;
  248.  
  249.      Contains the current com port that the bbs is using.
  250.  
  251.  
  252. CURRENT_FORGROUND: byte;
  253.  
  254.      This variable stores the current foreground.
  255.  
  256.  
  257. CURRENT_BACKGROUND: byte;
  258.  
  259.      This variable stores the current background.
  260.  
  261.  
  262. GRAPHICS: integer;
  263.  
  264.      Graphics specifys a text mode:
  265.  
  266.       1 : Ascii - General Text
  267.       2 : Ascii's Extended Graphics and General Text
  268.       3 : Ansi Color and Graphics
  269.       4 : Ansi Color and Graphics and Ansi Music (See Section on ANSI.TPU)
  270.  
  271.  
  272. HELP_AR: Array[1..14] of string[80];
  273.  
  274.      This array is displayed when the Sysop presses the Alt-H key. When
  275.   defining your own Alt-Key commands you will want to add in what each
  276.   Alt-Key does and here is where you do it.
  277.  
  278.                 ---(See: Configurable Alt Key Section)---
  279.  
  280.  
  281. IN_BUFFER: integer;
  282.  
  283.      This allows you to change the input buffer. The larger the input buffer
  284.   the more memory it will consume. The default buffer size if 1024 bytes.
  285.  
  286.  
  287. OUT_BUFFER: integer;
  288.  
  289.      This allows you to change the output buffer. The larger the output
  290.   buffer the more memory it will consume. The default buffer size if
  291.   1024 bytes.
  292.  
  293.  
  294. LOCAL: boolean;
  295.  
  296.      This boolean is alway true if in local mode and false if in remote mode.
  297.  
  298.  
  299. MINTIME: byte;
  300.  
  301.      By allowing the sysops to set this up in your door you can set a minimum
  302.   time on the door.
  303.  
  304.  
  305. MORECHK: boolean;
  306.  
  307.      This boolean allows you to toggle the more prompts on or off. this is
  308.   especially useful when writing non-scrolling doors.
  309.  
  310.  
  311. NODE_NUM: byte;
  312.  
  313.      Returns the current Node that the door is running under. 0 represents
  314.   a single node system.
  315.  
  316.  
  317. NOTIME: String;
  318.  
  319.      When the users time limit has been reached this string will be
  320.   displayed then the user will be returned to the bbs. This string has a
  321.   default of "(***TIME LIMIT EXCEEDED***)".
  322.  
  323.  
  324. PROC_PTR_AR: Array[1..26] of Pointer; (REMOVED IN SMALL VERSION)
  325.  
  326.      This array stores all the Author definable Alt-Key Pointer addresses.
  327.  
  328.               ---(See: Configurable Alt Key Section)---
  329.  
  330.  
  331. PROC_PTR_OnOff_AR: Array[1..26] of Pointer; (REMOVED IN SMALL VERSION)
  332.  
  333.      This array tells weither or not all the Author definable Alt-Keys
  334.   are in use or not.
  335.  
  336.               ---(See: Configurable Alt Key Section)---
  337.  
  338.  
  339. SAVE_SCREEN_CHAT: boolean; (REMOVED IN SMALL VERSION)
  340.  
  341.      Save_Screen_Chat enables you save the current screen when the ALT-C
  342.   key is pressed and then enter into chat on a clear screen. then after
  343.   exiting chat it will redraw the screen in the condition that it was in
  344.   before chat. As you can see this might be useful for non-scrolling doors.
  345.  
  346.  
  347. STACKED: string;
  348.  
  349.      The Procedure sread and sreadln can have stacked commands which is when
  350.   a user type something in like this:
  351.  
  352.                   "m;101;m;102;m;103;m;104"
  353.  
  354.      Notice the ";"'s throughout the example. well this is a stacked command.
  355.   the ";"'s indicate a seperate operation. This allows the user to type in
  356.   multiple operations to preform on one line and not have to go through each
  357.   and every prompt of the door. This can be very useful when used in combi-
  358.   nation with the Record_Macro command.
  359.  
  360.  
  361. STATFORE: byte;
  362.  
  363.      The status line foreground.
  364.  
  365.  
  366. STATBACK: byte;
  367.  
  368.      The status line background.
  369.  
  370.  
  371. STATLINE: boolean;
  372.  
  373.      A status line pops while any door is in operation if this boolean is
  374.   set true. The status line contains the user name and the program name an
  375.   the users time left.
  376.  
  377.  
  378. SYSOP_FIRST_NAME: string[30];
  379.  
  380.      Returns the first name of the sysop. The name is entered into door-driver
  381.   through the configuration menu.
  382.  
  383.  
  384. SYSOP_LAST_NAME: string[30];
  385.  
  386.      Returns the last name of the sysop. The name is entered into door-driver
  387.   through the configuration menu.
  388.  
  389.  
  390. USER_FIRST_NAME: string[30];
  391.  
  392.      Returns the first name of the current user of the door program. The
  393.   user's name is determined from whatever door information is passed from
  394.   the bbs software.
  395.  
  396.  
  397. USER_LAST_NAME: string[30];
  398.  
  399.      Returns the last name of the current user of the door program. The
  400.   user's name is determined from whatever door information is passed from
  401.   the bbs software.
  402.  
  403.  
  404. USER_ACCESS_LEVEL: word;
  405.  
  406.      Returns the access level of the user. The user's access level is
  407.   determined from whatever door information is passed from the bbs software.
  408.  
  409.  
  410. FILTER: boolean; (REMOVED IN SMALL VERSION)
  411.  
  412.      Toggles the sysop-filter. This option may be used as a toggle within
  413.   your program. The intent of the feature is to insure paranoid users that
  414.   the sysop is not viewing their game and using it to his own benefit. The
  415.   filter will scramble any numeric data that is displayed on the local
  416.   side. The option can be allowed by the sysop by setting the option in the
  417.   configuration menu. If the option in the configuration menu is set to true
  418.   the sysop can toggle the filter on and off with ALT-F, but an "!" will echo
  419.   remotely and the user will know you have toggled on or off. Authors may
  420.   install this option into there game by setting up an option in thier door
  421.   to toggle the filter TRUE or FALSE, otherwise the user cannot turn the
  422.   filter on or off.
  423.  
  424.  
  425. PROGNAME: String[60];
  426.  
  427.      This option must be set by the programmer, preferably in the beginning
  428.   of the door. It sets the name that will be displayed centered on line
  429.   25 of the screen. It is simply used for cosmetic purposes.
  430.  
  431.  
  432. MACRO_STRING: string;
  433.  
  434.       The contents of this variable are treated as a macro. Whenever the
  435.    user types a CTRL-N, the string will be output. The string may be
  436.    easily recorded with the RECORD_MACRO procedure and displayed with
  437.    the DISPLAY_MACRO procedure.
  438.  
  439.  
  440. SETFORECHECK: boolean; (default=FALSE)
  441.  
  442.       This variable when set to TRUE will cause DDTERM to filter out
  443.    repetetive SET_FOREGROUND() calls. If for example, you set the foreground
  444.    to gray, then set it to gray again later while the foreground is still
  445.    gray, the second call would be ignored. This can spare the user from
  446.    the slowdown effects of meaningless, repetetive SET_FOREGROUND calls.
  447.  
  448. Referance - Types
  449. -----------------
  450.  
  451. WINDOWAR = Array[1..23] of string[79];   (REMOVED IN SMALL VERSION)
  452.  
  453.      WindowAr is used by the ReWindow unit to hold the windows text.
  454.  
  455.  
  456. MEMORYAR = Array[0..3999] of byte;       (REMOVED IN SMALL VERSION)
  457.  
  458.      MemoryAr is used by the GetScreen and ReInitScreen routines.
  459.  
  460.  
  461. Referance - Constants
  462. ---------------------
  463.  
  464. VERSION = 'Version 3.00; 6-21-90'        (LARGE VERSION)
  465.         = 'Version 3.00S; 6-21-90'       (SMALL VERSION)
  466.  
  467.  
  468. Reference - Procedure Substitutions
  469. -----------------------------------
  470.   This section is provided to help you in figuring out which doordriver
  471. routines you should call to replace turbo's standard I/O routines.
  472.  
  473. char:=READKEY
  474.         replace with SREAD_CHAR(char)
  475.  
  476. WRITELN(string_variable)
  477.         replace with SWRITELN(string_variable)
  478.  
  479. WRITE(string_variable)
  480.         replace with SWRITE(string_variable)
  481.  
  482. WRITE/WRITELN(Char,integer,word,longint,real,etc)
  483.         you must use the appropriate SWRITE or SWRITELN command, but you
  484.         must first convert the data you are writing into a string variable.
  485.         (i.e. assuming "TEMPSTR" is a temporary string and "DATA" is youre
  486.         non-string data)
  487.  
  488.             WORD/INTEGER/REAL/LONGINT           CHAR
  489.  
  490.             STR(data,tempstr);                  tempstr:=data;
  491.             SWRITE(tempstr); (or SWRITELN)      SWRITE(tempstr); (or swriteln)
  492.  
  493. CLRSCR
  494.         replace with SCLRSCR
  495.  
  496. GOTOXY(x,y)
  497.         replace with SGOTO_XY(x,y)
  498.  
  499. READLN(string_variable)
  500.         replace with SREAD(string_variable)
  501.  
  502. READLN(integer_variable)
  503.         replace with SREAD_NUM(integer_variable)
  504.  
  505. READLN(word_variable)
  506.         replace with SREAD_WORD(word_variable)
  507.  
  508. READLN(longint_variable)
  509.         replace with SREAD_LONGINT(word_variable)
  510.  
  511.  
  512.  
  513. REFERENCE - Author Configurable Alt Key Section (REMOVED IN SMALL VERSION)
  514. -----------------------------------------------
  515.  
  516.      Contained in doordriver are routines that can be configured to accept
  517.    any authors routines. This allows authors to write up there own, Game
  518.    oriented, user editor that can be poped up by almost any alt-key.
  519.  
  520.      The actual process is easy, all you need to do is write up a procedure
  521.    that you would like the sysop to be able to call up with an ALT-Key. This
  522.    procedure MUST BE A FAR PROCEDURE!! To make a normal procedure a Far
  523.    procedure you must put a "{$F+}" (without the quotes) before your
  524.    procedure and an "{$F-}" (again without the quotes) after your procedure.
  525.    After you have completed that and the procedure compiles you must modify
  526.    1 variable, PROC_PTR_AR.
  527.  
  528.      PROC_PTR_AR is set in the following manor:
  529.  
  530.         PROC_PTR_AR[1]:=@<Put the name of your procedure here>;
  531.  
  532.      This tells DoorDriver that the ALT-A key is enabled. The Array for both
  533.    variables is set up in the manor that 1 is equal to ALT-A and 26 is equal
  534.    to ALT-Z.
  535.  
  536.      After you have set your procedure up and running you may want to tell
  537.    the sysop that the procedure exists through the Help display which is
  538.    popped up localy by pressing ALT-H. Well, Only 7 lines of the help
  539.    display have so far been taken up, so that leaves you 14 more. These 14
  540.    more lines can be defined by setting HELP_AR. HELP_AR is an array of 14
  541.    strings. They will be displayed when ALT-H is hit.
  542.  
  543.      Some of the letters are not definable because DoorDriver uses them,
  544.    such as:
  545.  
  546.      ALT-H : HELP MENU
  547.      ALT-I : SYSTEM INFO
  548.      ALT-F : FILTER TOGGLE
  549.      ALT-C : CHAT MODE
  550.      ALT-D : DROP TO DOS
  551.  
  552.      Remeber that when defining new procedure for Alt-Keys you MUST MAKE
  553.    THEM FAR (as explained above) and you must define where the procedures
  554.    are at the absolute beginning of your source code(as explained above).
  555.  
  556.      Refer to example program "EDITTEST.PAS" which uses the template editor
  557.    to edit users when the ALT-E key is pressed. This Program will sit and
  558.    until you press any alt-keys or to quit press return. The template editor
  559.    is explained further allong in the document.
  560.  
  561.  
  562. REFERENCE - ANSI MENU ROUTINES
  563. ------------------------------
  564.  
  565.      There is an additional TPU file included with the doordriver package that
  566.   includes a user-friendly ANSI-MENU handler. The TPU can be called up with
  567.   the statement "USES ANSIMENU". The menu system is accessed by the
  568.   single function:
  569.  
  570.          CHAR:=GetAnsiMenu(menu_definition_template)
  571.  
  572.       The menu-definition-template type is declared within the unit. It is
  573.    identical to the structure below:
  574.  
  575.  
  576.        menutype = record
  577.              header: string[80];
  578.              footer: string[80];
  579.              headercolor, footercolor, optioncolor, desccolor, arrowcolor: byte;
  580.              bracketcolor: byte;
  581.              numoptions: byte;
  582.              options: array[1..20] of string[1];
  583.              desc: array[1..20] of string[80];
  584.             end;
  585.  
  586.       The structure is usually defined by your program as a constant. The
  587.    ANSIMENU procedure interprets this strucure and uses it to generate
  588.    a centered menu. The menu options may be selected by using the numeric
  589.    keypad (the 8 for up and the 2 for down) or by simply typing the
  590.    the letter of the option.
  591.       A sample door, NEWS.PAS, is included to demonstrate the use of the
  592.    ansimenu unit.
  593.  
  594. REFERENCE - REMOTE WINDOW ROUTINES (REMOVED IN SMALL VERSION)
  595. -------------------------------------------------------------
  596.  
  597.      These procedures are contained in the TPU file "DoorDriv.tpu":
  598.      --------------------------------------------------------------
  599.  
  600.      Procedure GetScreen(Tx,Ty,Bx,By:integer; Var topar : MemoryAr)
  601.  
  602.         This Procedure allows you to save the current screen,or part
  603.       of the screen, by defining:
  604.  
  605.       Tx - X Coordinate of the top left hand corner of the window
  606.       Ty - Y Coordinate of the top left hand corner of the window
  607.       Bx - X Coordinate of the bottom right hand corner of the window
  608.       By - Y Coordinate of the bottom right hand corner of the window
  609.    Topar - MemoryAr is an Array[0..3999] of Byte which holds the
  610.            screens contents.
  611.  
  612.  
  613.      Procedure ReinitScreen(Tx,Ty,Bx,By:integer; Var topar : MemoryAr)
  614.  
  615.         This Procedure allows you to recall the screen saved by the
  616.       procedure GetScreen using the previously saved MemoryAr.
  617.  
  618.       Tx - X Coordinate of the top left hand corner of the window
  619.       Ty - Y Coordinate of the top left hand corner of the window
  620.       Bx - X Coordinate of the bottom right hand corner of the window
  621.       By - Y Coordinate of the bottom right hand corner of the window
  622.    Topar - MemoryAr is an Array[0..3999] of Byte which holds the
  623.            screens contents.
  624.  
  625.      Both of these procedures use a Type called MemoryAr. MemoryAr
  626.        is defined in "DoorDriv.Tpu" as an array[0.3999] of Byte.
  627.  
  628.      These procedures are contained in the TPU file "ReWindow.tpu":
  629.      --------------------------------------------------------------
  630.  
  631.      Procedure RWindow(TopX,TopY,BottomX,BottomY,
  632.                        BorderFg,BorderBg,
  633.                        TxtFg,TxtBg : Integer;
  634.                        Txtstring : Windowar)
  635.  
  636.  
  637.         This procedure draws a remote window which is defined by
  638.      by the author to fit his or her specific needs.
  639.  
  640.        Topx - X Coordinate of the top left hand corner of the window
  641.        Topy - Y Coordinate of the top left hand corner of the window
  642.     Bottomx - X Coordinate of the bottom right hand corner of the window
  643.     Bottomy - Y Coordinate of the bottom right hand corner of the window
  644.    BorderFg - The Windows border foreground
  645.    BorderBg - The Windows border background
  646.       TxtFg - The Windows Text foreground
  647.       TxtBg - The Windows Text background
  648.   TxtString - The array that specifys what gets written in the window
  649.                    WindowAr = Array[1..23] of string[78];
  650.  
  651.  
  652. REFERENCE - DDTERM TERMINAL SUPPORT
  653. -----------------------------------
  654.  
  655.        Doordriver has built-in support for my DDTERM terminal package. When
  656. DDTerm successfully communicates with doordriver, the result can be a
  657. massively speeded up session. DDTerm provides the following benefits:
  658.  
  659.        - Data can be placed in "packets". These packets only need to be
  660.          sent once - once they are on the remote side, DoorDriver can call
  661.          them up to be displayed by sending a simple 6-byte sequence.
  662.  
  663.        - ANSI color changes are sent in three byte sequences instead of the
  664.          lengthly 4-6 byte sequences they usually require.
  665.  
  666.        - Many more features (context sensitive help, elapsed time updates,
  667.          etc) that I don't have time to discuss.
  668.  
  669.        Here are the procedures for DDTERM activation and packet control:
  670.  
  671.        PROCEDURE DDTERMON;
  672.  
  673.             This activates DDTERM capabilities. What you should do is allow
  674.          the user to select an option from one of your menus to activate
  675.          DDTERM support if he/she is using DDTERM. (Recognition of the
  676.          DDTERM terminal program is not automatic)
  677.  
  678.        PROCEDURE PACKETSTART(N: WORD);
  679.  
  680.             This indicates the start of a DDTERM packet. Once this statement
  681.          is issued, all output will be redirected to the packet instead of
  682.          the com-port. The "N" is a unique identifier number for the packet -
  683.          you must number each packet you use seperately.
  684.  
  685.        PROCUEDRE PACKETSEND;
  686.  
  687.             This procedure will send the data since the last PACKETSTART.
  688.          Before sending the data, DOORDRIVER will "ask" DDTERM if the packet
  689.          is already present. If so, DDTERM will simply display the packet
  690.          rather than having doordriver transmit the whole packet.
  691.  
  692.        PROCUEDRE DDTERMOFF;
  693.  
  694.             This shuts down DDTERM support.
  695.  
  696.        EXAMPLE:
  697.  
  698.        begin;
  699.         DDTERMON;
  700.         packetstart(1);
  701.         swriteln('All of this text is inside a DDTERM packet.');
  702.         swriteln('It only needs to be sent ONCE to the remote, then it can');
  703.         swriteln('be called up without re-transmission of the data.');
  704.         packetsend;
  705.        end;
  706.  
  707.        That little batch of code would place those three swriteln() lines
  708.        into the DDTERM packet. The first time the code was encountered, the
  709.        actual bytes of the packet would be sent. The second time, DoorDriver
  710.        would request DDTERM to display the packet.
  711.  
  712.        PACKETSTART and PACKETSEND can be placed in a program with or without
  713. DDTERM support active - if DDTERM has not been activated, the procedures will
  714. simply be ignored and not effect normal program operation.
  715.  
  716.  
  717.  
  718.  
  719. Update History:
  720.  
  721.         2.50   - First Public release
  722.  
  723.         2.55   - DoorDriver screen removed and replaced by a 2-line
  724.                  message.
  725.                - Small problem with SET_FOREGROUND has been fixed.
  726.                - the NEWS.DIR file which was left out in previous versions
  727.                  has now been included.
  728.  
  729.         2.60   - Modifications to the ANSIMENU TPU
  730.                    1) The TPU is now called "ANSIMENU" instead of
  731.                       "ANSIMENUSYSTEM". If your program was using the
  732.                       ansimenu routines, then the "uses" statement
  733.                       must be changed from "uses ansimenusystem" to
  734.                       "uses ansimenu".
  735.                    2) The function name "ANSIMENU" has been repleaced
  736.                       by "GETANSIMENU". All occurences of the function
  737.                       call <char>:=Ansimenu(<MenuTemplate>) must be
  738.                       changed to <char>:=GetAnsiMenu(<MenuTemplate>).
  739.                - DoorDriver title screen/info shrunk even more at
  740.                  users' request.
  741.  
  742.         3.00   - Doordriver majorly modified to switch to use of control
  743.                  file rather than the /C configuration.
  744.                - INITDOORDRIVER(filename) must be called before any of
  745.                  doordrivers routines are used.
  746.                - SREAD_CHAR was omitted by accident in previous versions of
  747.                  the documentation.
  748.                - Many new configuration options present in the control file
  749.                  including EGA/VGA support.
  750.                - Two versions of DoorDriver are now included. DOORDRIV is the
  751.                  normal version with all features included while DOORDRSM
  752.                  is the SMALL version which leaves out the REWINDOW,
  753.                  ALT-KEY, and SYSOP FILTER support. If your program begins
  754.                  to run low on memory, you may wish to consider using
  755.                  DOORDRSM instead of DOORDRIV.
  756.                - Doordirv.INT has been included in the package and includes
  757.                  the actual interface section of doordriver.
  758.                - CFGEDITR.TPU has been altered. (See edittest.pas for the new
  759.                  template record structure)
  760.  
  761.         4.00   - The DDANSI unit went through a major overhaul - it should
  762.                  now be faster and more error free.
  763.  
  764.                - DDTERM support included - see the above section for
  765.                  information.
  766.  
  767.                - Both TP5.5 and TP6.0 routines included.
  768.  
  769. Credits
  770. -------
  771.      SCOTT BAKER (myself)
  772.          Author of DOORDRIVER, NEWS, and ANSIMENU
  773.  
  774.      DERRICK PARKHURST
  775.          Repairs to the still malfunctioning ANSI.TPU unit
  776.          Various work on configurable editor routines
  777.          Remote windowing and Windowed chat support
  778.          Sysop filter
  779.  
  780.      CARL EVANS (of Vervans War Board)
  781.          Addition of PC-BOARD 14 support
  782.  
  783.  
  784. Copyright and Registration
  785. --------------------------
  786.  
  787.        The DOORDRIVER routines are copyrighted by Scott Baker and
  788. Derrick Parkhurst. This copyright includes all material contained in this
  789. package - TPU modules, PAS files, sample door, Documentation, etc.
  790.        You are permitted to USE these routines in your own doors if you
  791. wish under the following conditions:
  792.  
  793.            1) Any material which you use from this package must not be
  794.               modified in any way.
  795.  
  796.            2) No material in this package may be used for commercial
  797.               purposes without explicit written permission of the authors.
  798.  
  799.            3) You MUST include credit to the authors of these routines
  800.               in your program.
  801.  
  802.        I encourage you to register this package with the authors if you
  803. find it useful to your programming. Registration/donations can be mailed
  804. to the following address:
  805.  
  806.                                 Scott M. Baker
  807.                            6433 Tierra Catalina #48
  808.                                Tucson, Az 85718
  809.  
  810.        If you wish to contact the authors of this software for any reason,
  811. they may be reached by the address above, or you may log on to our software
  812. support bbs:
  813.  
  814.                          "The Not-Yet-Named bbs"
  815.  
  816.                            Sysop: Scott Baker
  817.                             Baud: 2400, 1200, 300
  818.                          NODE #1: (602) 577-3650
  819.                          NODE #2: (602) 577-3419
  820.                          RBBSNET: 8:902/10
  821.                          FIDONET: 1:300/9
  822.  
  823.